<?php

use think\migration\Seeder;

class BasicRegionData extends Seeder
{
    /**
     * Run Method.
     *
     * Write your database seeder using this method.
     *
     * More information on writing seeders is available here:
     * http://docs.phinx.org/en/latest/seeding.html
     */
    public function run()
    {
        $table = $this->table('basic_region');
        $rows = [
            [
                //step1:ID和名称
                'id'      => '53',
                'name'      => '长治市',
                'parent_id' => '4',
                'level'     => '2',
                'status'    => '1',

                //step2:网格经纬度,默认长治网格的经纬度
                'grid_start_longitude' => '36.0',
                'grid_start_latitude' => '112.7',
                'grid_end_longitude' => '36.5',
                'grid_end_latitude' => '113.3',
            ],
        ];
        $table->insert($rows)->save();
    }
}